#include <iostream>
#include <string>
#include <cctype>
using namespace std;

int main() {
	
	string str;
	getline(cin,str);
	string sRet,sTmp;
	for(int i=0;i<static_cast<int>(str.size());++i){
		if(isdigit(str[i])){			
			sTmp+=str[i];
		}
		else{
			if(sTmp.size()>sRet.size()){
				sRet=sTmp;
			}
			sTmp.clear();
		}
	}
	if(sTmp.size()>sRet.size()){
		sRet=sTmp;
	}	
	cout<<sRet;
	return 0;
}
